@echo off
echo === Building with Visual Studio 2005 ===

REM Setup VS2005 environment
call "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86

cd /d D:\vc\devops-platform

REM Clean previous build
if exist build-vs2005 rmdir /s /q build-vs2005
mkdir build-vs2005
cd build-vs2005

echo 1. Running CMake configuration for VC++2005...
cmake .. -G "Visual Studio 8 2005"

echo 2. Building project with VC++2005...
cmake --build . --config Release

if %errorlevel% equ 0 (
    echo [SUCCESS] VC++2005 Build completed! Executable: build-vs2005/Release/devops-platform.exe
) else (
    echo [ERROR] VC++2005 Build failed!
    exit /b 1
)
